# -*- coding: utf-8 -*-
# 操作内容：
# @Software: PyCharm
# @File: login_api.py
# @Author: 一碗好酒（张智）
# @E-mail: 1473658931@qq.com, 
# @Time: 7月 08, 2021
# ---
from api.base_api import BuyerBaseApi
from common.client import RequestsClient
from common.encry_decry import md5


class BuyerLoginApi(BuyerBaseApi):
    def __init__(self):
        #继承父类，并改写
        super().__init__()
        # self.host ='http://www.mtxshop.com:7002'
        self.url = self.host + '/passport/login'
        # 请求参数构造为字典
        self.params = {
            'username': 'yiwanhaojiu',
            'password': md5('zhangquan1989'),
            # 验证码固定
            'captcha': '1512',
            'uuid': '11yu'

        }
        self.method = 'post'

if __name__ == '__main__':
    buyerapi = BuyerLoginApi()
    resp = buyerapi.send()
    print(resp.status_code)
    print(resp.text)